<template>
  <section class="messageVoice" :class="isSelf ? 'isSelf' : null">
    <div class="li">
      <span v-for="item in [8, 14, 21, 20, 14, 7, 17, 6, 10, 6, 2, 4]" :style="{ height: item + 'px' }"></span>
    </div>
    <div class="time">
      <span>26s</span>
    </div>
  </section>
</template>
<script>
import { defineComponent } from 'vue';

export default defineComponent({
  name: "MessageVoice",
  props: {
    isSelf: false,
  },
  setup (props) {
  }
})
</script>

<style scoped lang="less">
.messageVoice {
  max-width: 300px;
  min-width: 140px;
  background-color: rgba(221, 223, 223, 1);
  text-align: left;
  padding: 10px;
  background: #DDDFDF;
  box-shadow: inset 0px 0px 4px 0px #DFDFDF;
  border-radius: 10px;
  display: flex;
  align-items: center;
  border-top-left-radius: 0;
  cursor: pointer;

  .li {
    display: flex;
    flex: 1;
    align-items: center;

    >span {
      width: 2px;
      background-color: rgba(36, 36, 36, 1);
      margin-right: 5px;
    }
  }


  &.isSelf {
    border-top-right-radius: 0;
    border-top-left-radius: 10px;
    background: linear-gradient(115deg, #009BFD 8%, #00E8E8 100%);

    .li {
      >span {
        background-color: rgba(254, 254, 254, 1);
      }
    }

    .time {
      color: #fff;
    }
  }

  .time {
    font-size: 14px;

    font-weight: 400;
    color: #242424;
    margin-left: 10px;
  }
}
</style>
